import React, { Component } from 'react';
import '../../styles/Index/Home/Buying.scss'

class Buying extends Component {
    constructor(props) {
        super(props);
        this.state = {
            goods1: [
                {
                    pic: 'https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fimg.alicdn.com%2Fbao%2Fuploaded%2Fi4%2F2900629641%2FO1CN01xJmlGO2L5dB6jEVid_%21%212900629641.jpg&refer=http%3A%2F%2Fimg.alicdn.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=auto?sec=1676457086&t=a91528bc6408ad4050f60d0580387ed9',
                    price: 99,
                    price0:999
                },
                {
                    pic: 'https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fimg.alicdn.com%2Fbao%2Fuploaded%2Fi4%2F2900629641%2FO1CN01xJmlGO2L5dB6jEVid_%21%212900629641.jpg&refer=http%3A%2F%2Fimg.alicdn.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=auto?sec=1676457086&t=a91528bc6408ad4050f60d0580387ed9',
                    price: 99,
                    price0:999
                },
                {
                    pic: 'https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fimg.alicdn.com%2Fbao%2Fuploaded%2Fi4%2F2900629641%2FO1CN01xJmlGO2L5dB6jEVid_%21%212900629641.jpg&refer=http%3A%2F%2Fimg.alicdn.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=auto?sec=1676457086&t=a91528bc6408ad4050f60d0580387ed9',
                    price: 99,
                    price0:999
                },
                {
                    pic: 'https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fimg.alicdn.com%2Fbao%2Fuploaded%2Fi4%2F2900629641%2FO1CN01xJmlGO2L5dB6jEVid_%21%212900629641.jpg&refer=http%3A%2F%2Fimg.alicdn.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=auto?sec=1676457086&t=a91528bc6408ad4050f60d0580387ed9',
                    price: 99,
                    price0:999
                },
            ]
        }
    }
    render() {
        return (
            <div className='buying'>
                <div className="title">限时抢购<span>03:09:56</span></div>
                <p>每天10点 限量秒杀</p>
                <div className="goods1">
                    {
                        this.state.goods1.map((item, index) => {
                            return (
                                <div className="item" key={index}>
                                    <div className="pic"><img src={item.pic} alt="" /></div>
                                    <div className="price">￥{item.price}.0</div>
                                    <div className="price0">￥{item.price0}.99</div>
                                </div>
                            )
                        })
                    }
                </div>
            </div>
        );
    }
}

export default Buying;